
from pydantic import BaseModel,ConfigDict
from typing import Optional,List
from datetime import datetime

class User(BaseModel):
    userName: Optional[str] = None
    password: Optional[str] = None
    sex:Optional[str] = None
    age:Optional[int] = None
    edu:Optional[str] = None
    tele:Optional[str] = None
    nickName:Optional[str] = None
    id:Optional[int] = None
    avatar:Optional[str] = None
    
class Question(BaseModel):
    question:Optional[object] = []
    title:Optional[str] = None
    type:Optional[str] = None
    typeCN:Optional[str] = None
    hasStandardAnswer:Optional[bool] = None
    analysis:Optional[str] = None
    choices:Optional[str] = None
    answer:Optional[str] = None
    userAnswer:Optional[str] = None
    
class Questionnaire(BaseModel):
    title: Optional[str] = None
    desc: Optional[str] = None
    type: Optional[str] = None
    distributeTaskId:Optional[int] = None
    questionList:Optional[List] = []
    userId: Optional[int] = None
    id:Optional[int] = None
    createTime: Optional[datetime] = None
    updateTime: Optional[datetime] = None
    faceList:Optional[List] = []
    faceAnaList:Optional[List] = []
    
class UserGroup(BaseModel):
    title: Optional[str] = None
    desc: Optional[str] = None
    userId: Optional[int] = None
    userIdList: Optional[List] = []
    id:Optional[int] = None
    createTime: Optional[str] = None
    updateTime: Optional[str] = None
    
    
class DistributeTask(BaseModel):
    id:Optional[int] = None
    title: Optional[str] = None
    desc: Optional[str] = None
    userId: Optional[int] = None
    userGroupIdList: Optional[List] = []
    questionnaireIdList: Optional[List] = []
    startTime: Optional[str] = datetime.now()
    endTime: Optional[str] = datetime.now()
    createTime: Optional[str] = datetime.now()
    updateTime: Optional[str] = datetime.now()
    
class QuestionnaireRecord(BaseModel):
    record: Optional[object] = None
    questionnaireId: Optional[str] = None
    status: Optional[int] = None
    id:Optional[int] = None
    createTime: Optional[str] = None
    updateTime: Optional[str] = None
    distributeTaskId: Optional[int] = None
    faceList:Optional[List] = []
    faceAnaList:Optional[List] = []
    
class QuestionnaireType(BaseModel):
    id:Optional[int] = None
    type: Optional[str] = None
    desc: Optional[str] = None
    createTime: Optional[str] = None
    updateTime: Optional[str] = None
    
class baseData(BaseModel):
    title: Optional[str] = None
